package stu.zhl.jdk11;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author zhanghanlin
 * @ClassName ReferenceBean
 * @date 2019/12/29 下午7:44
 * @Description
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ReferenceBean {

    /**
     * 1024*1024
     */
    private static int MB = 1024 << 10;

    /**
     * 用来填充内存测试引用
     */
    private byte[] test;

    /**
     *
     * @param memSize
     */
    public ReferenceBean(int memSize) {
        this.test = new byte[memSize * MB];
    }
}
